import request from "@/utils/request";

// 查询音乐评论列表
export function listCommentVo(songId) {
  return request({
    url: "/comment/comment/listCommentVo/" + songId,
    method: "get",
  });
}
//查询指定歌曲的评论数量
export function getCommentCount(songId) {
  return request({
    url: "/comment/comment/getCommentCount/" + songId,
    method: "get",
  });
}

// 查询音乐评论列表
export function listComment(query) {
  return request({
    url: "/comment/comment/list",
    method: "get",
    params: query,
  });
}

// 查询音乐评论详细
export function getComment(commentId) {
  return request({
    url: "/comment/comment/" + commentId,
    method: "get",
  });
}

// 新增音乐评论
export function addComment(data) {
  return request({
    url: "/comment/comment",
    method: "post",
    data: data,
  });
}

// 修改音乐评论
export function updateComment(data) {
  return request({
    url: "/comment/comment",
    method: "put",
    data: data,
  });
}

// 删除音乐评论
export function delComment(commentId) {
  return request({
    url: "/comment/comment/" + commentId,
    method: "delete",
  });
}
